import request from '@/utils/request.js'



export const clientListService = (params, token) => {
  return request.get('/client', {
    params,
    headers: {
      Authorization: token
    }
  })
}


export const clientAddService = (clientData) => {
  return request.post('/client', clientData)
}


export const clientUpdateService = (clientData) => {
  return request.put('/client', clientData)
}


export const clientDeleteService = (id) => {
  return request.delete(`/client?id=${id}`)
}

export const clientSearchByStateService = (state) => {
  return request.get(`/client/search`, { params: { state } })
}

export const clientCategoryListService = () => {
  return request.get('/client/category')
}

